

import java.io.File;

import net.sf.hibernate.Session;
import net.sf.hibernate.SessionFactory;
import net.sf.hibernate.Transaction;
import net.sf.hibernate.cfg.Configuration;


public class Mytest {

	
	public static void main(String[] args) {
		try{
			File propertyFile = new File("D:/workspace/sg_market/src/hibernate.cfg.xml"); 
			Configuration conf = null; 
			conf = new Configuration().configure(propertyFile); 

//			SessionFactory sf = new Configuration().configure().buildSessionFactory();
			SessionFactory sf= conf.buildSessionFactory(); 
			Session session = sf.openSession();
			Transaction tx = session.beginTransaction();
			System.out.println("ksdfjsldfjlk");
			tx.commit();
			session.close();
		}catch(Exception e){
			e.printStackTrace();
		}
		

	}

}
